#!/bin/bash
DAEMON=xz-mlserver-legacy
sudo docker pull docker.peidan.me/ipwx/mlstorage-server
sudo docker stop ${DAEMON}>/dev/null 2>&1
sudo docker rm ${DAEMON}>/dev/null 2>&1
sudo docker run \
    -d --name=${DAEMON} \
    --restart=unless-stopped \
    -p 12688:8080 \
    -e MLSTORAGE_SERVER_HOST=0.0.0.0 \
    -e MLSTORAGE_SERVER_PORT=8080 \
    -e MLSTORAGE_SERVER_WORKERS=4 \
    -e MLSTORAGE_EXPERIMENT_ROOT=/mnt/mfs/mlstorage-experiments/v-xz21 \
    -v /mnt/mfs/mlstorage-experiments/v-xz21:/mnt/mfs/mlstorage-experiments/v-xz21 \
    -e MLSTORAGE_MONGO_CONN=mongodb://xhw15:Life4Freedom@192.168.65.5,192.168.65.6/admin?replicaSet=rs0 \
    -e MLSTORAGE_MONGO_DB=xhw15 \
    -e MLSTORAGE_MONGO_COLL=xz-experiments \
    docker.peidan.me/ipwx/mlstorage-server
